import useModalState from "../../settings/GlobalStates.ts";


const FAB = ({clickHandler, img}: { clickHandler: () => void, img: string }) => {


    const setState = useModalState((state) => state.callFromFAB)



    return (

        <button id={"fab"} className={"btn primary-button"} data-bs-toggle="modal" data-bs-target="#exampleModal"
                onClick={
                    () => {


                        setState()
                        clickHandler()
                    }


                }>

            <svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" fill="currentColor"
                 className="bi bi-chat-dots" viewBox="0 0 18 18">

                <path
                    d={img}/>
            </svg>

        </button>
    )
}

export default FAB